package com.wx.JerseySpring.util;

import com.wx.JerseySpring.entity.ResultParam;
import net.sf.json.JSONObject;


/**
 * Created by Administrator on 2016/11/21.
 */
public class ResultUtil {

    public static String resultStr(int code,boolean flog,Object obj){
        ResultParam result = new ResultParam();
        result.setCode(code);
        result.setFlog(flog);
        JSONObject jsonObject = JSONObject.fromObject(obj);
        result.setResult(jsonObject.toString());
        JSONObject jsonObject1 = JSONObject.fromObject(result);
        return jsonObject1.toString();
    }
}
